package com.nf.action;

import com.nf.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class Test {

    @Autowired
    private TestService testService;

    public Test() {
        System.out.println("1、Test创建实例"+this);
    }

    @RequestMapping("/abc")
    public String ss(Model model){
        System.out.println("3、使用test.aa()");
        model.addAttribute("kkk",testService.getMoney());
        return "a1";
    }
}
